package com.neusoft.tijian.service.impl;

import com.neusoft.tijian.mapper.OverallResultMapper;
import com.neusoft.tijian.po.OverallResult;
import com.neusoft.tijian.service.OverallResultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * 总检结论服务实现类
 * 实现总检结论的业务逻辑处理
 */
@Service
public class OverallResultServiceImpl implements OverallResultService {

    // 注入总检结论数据访问层对象
    @Autowired
    private OverallResultMapper overallResultMapper;

    @Override
    public List<OverallResult> listOverallResultByOrderId(Integer orderId) {
        // 调用Mapper查询指定订单的总检结论
        return overallResultMapper.listOverallResultByOrderId(orderId);
    }

    @Override
    public Integer saveOverallResult(OverallResult overallResult) {
        // 调用Mapper新增总检结论
        return overallResultMapper.saveOverallResult(overallResult);
    }

    @Override
    public Integer updateOverallResult(OverallResult overallResult) {
        // 调用Mapper更新总检结论
        return overallResultMapper.updateOverallResult(overallResult);
    }

    @Override
    public Integer deleteOverallResult(Integer orId) {
        // 调用Mapper删除总检结论
        return overallResultMapper.deleteOverallResult(orId);
    }
}
